abstract class Animal{
    public abstract void cry();
}
/*class cat extends Animal{
    public void cry(){
        System.out.println("喵喵叫");
    }

}*/
//匿名内部类
public class Test {
    public static void main(String[] args) {
        Animal a=new Animal(){
            public void cry() {
                System.out.println("喵喵叫");
            }
        };
        a.cry();
    }
}
